/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.put.dcs_modeler.visualModelEditor.propertiesEditor.editors;

import java.util.Date;
import java.util.logging.Logger;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
import org.openide.nodes.PropertySupport;
import org.openide.nodes.Sheet;
import pl.put.model.computingObject.pin.Pin;

/**
 *
 * @author LukaszR
 */
public class ModelPropertyEditor extends AbstractNode
{

    public static Logger log = Logger.getLogger( ModelPropertyEditor.class.getName() );

    public ModelPropertyEditor()
    {
        super( Children.LEAF );
    }


    @Override
    protected Sheet createSheet()
    {
        Sheet sheet = Sheet.createDefault();
        Sheet.Set set = Sheet.createPropertiesSet();
        //APIObject obj = getLookup().lookup( APIObject.class );
        Pin p = new Pin( "dss", "sss");
        try
        {
            
            
            Property indexProp = new PropertySupport.Reflection( p, String.class, "type" );
            Property dateProp = new PropertySupport.Reflection( p, String.class, "name" );

            indexProp.setName( "index" );
            dateProp.setName( "date" );

            set.put( indexProp );
            log.info( "ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd");
            set.put( dateProp );

        }
        catch ( NoSuchMethodException ex )
        {
            log.warning( ex.getMessage() );
        }
        set.setDisplayName( "krowa" );
        sheet.put( set );
        return sheet;


    }
    
}
